export const beanCopy = <V>(vo: V, entity: any): V => {

    const result: V = {} as V

    const voKeys = Object.keys(vo);
    for (const entityKey in entity) {
        if(voKeys.includes(entityKey)) {
            result[entityKey] = entity[entityKey];
        }
    }

    return result
}

export const beanCopyArray = <V>(vo: V, entity: any[]):V[] => {
    const result: V[] = []
    entity.forEach((ent: any) => {
        result.push(beanCopy(vo, ent));
    })
    return result
}